package com.example.myapplication5;

import android.content.Intent;
import android.os.Bundle;
import android.transition.Explode;
import android.transition.Fade;
import android.transition.Slide;
import android.view.Window;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class TranslationToActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        int flag = intent.getIntExtra("flag", 1);
        if (flag == 1) {
            getWindow().setEnterTransition(new Explode());
        } else if (flag == 2) {
            getWindow().setEnterTransition(new Slide());
        } else if (flag == 3) {
            getWindow().setEnterTransition(new Fade());
        } else if (flag == 4) {
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
        }
        setContentView(R.layout.activity_to);
    }
}